package com.ruoyi.client.pojo.form;

import com.fasterxml.jackson.annotation.JsonAlias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 保存订单项param
 */
@Data
@ApiModel(description = "保存订单项参数")
public class OrderItemInsertForm {

    @ApiModelProperty(value = "商品id", position = 1, required = true)
    @NotNull(message = "商品id不能为空")
    @JsonAlias({"goods_id", "goodsId"})
    private Long productId;

    @ApiModelProperty(value = "数量", position = 2, required = true)
    @NotNull(message = "数量不能为空")
    private Long count;

    @ApiModelProperty(value = "价格", position = 3, required = true)
    @NotNull(message = "价格不能为空")
    private BigDecimal price;
}